import { fail, redirect } from "@sveltejs/kit"; import { fd, post, login } from "$lib/utils"; export const actions = { default: async ({ cookies, params, request }) => { const ip = request.headers.get("cf-connecting-ip"); let error; const { code } = params; const { password } = await fd(request); try { const user = await post("/reset", { code, password }); user.password = password; try { await login(user, cookies, ip); error = null; } catch (e: any) { error ||= e.message; } if (error) return fail(400, { error }); redirect(307, `/${user.username}`); } catch (e: any) { console.log(e.message); return fail(400, { error: e.message }); } }, }; get'> coinos ui — legacy coinos.io web app (SvelteKit)coinos
aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.css
blob: 1689e207f6a8df4394bf09928a6dbd608e60ae3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41